const { DataTypes } = require('sequelize');
const sequelize = require('../index');

module.exports = sequelize.define('User', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    comment: '用户ID'
  },
  username: {
    type: DataTypes.STRING,
    comment: '用户名'
  },
  nickname: {
    type: DataTypes.STRING,
    comment: '昵称'
  },
  password: {
    type: DataTypes.STRING,
    comment: '密码'
  },
  phone: {
    type: DataTypes.STRING,
    comment: '手机号'
  },
  email: {
    type: DataTypes.STRING,
    comment: '邮箱'
  },
  avatar: {
    type: DataTypes.STRING,
    comment: '头像'
  },
}, {
  tableName: 't_user'
})
